﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.Json.Serialization;

namespace Model
{
    //用户班级中间表
    public class UserClass
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //用户班级id
        public int UserClassId { get; set; }
        //用户id
        public int UserId { get; set; }
        //班级id
        public int ClassesId { get; set; }
        //软删除
        public Boolean IsDelete { get; set; }
        //创建时间
        public DateTime CreateTime { get; set; } = DateTime.Now;
        //更新时间
        public DateTime UpdateTime { get; set; } = DateTime.Now;

        //导航属性
        [JsonIgnore]
        //指向User
        public User User { get; set; }
        //指向Class
        public Classes Classes { get; set; }
    }
}
